Skip to content

Gate release tag creation - #11

Merged
yzm1 merged 1 commit into
mainfrom
codex/release-tag-gate
Aug 12, 2026
Merged

Gate release tag creation#11
yzm1 merged 1 commit into
mainfrom
codex/release-tag-gate

Conversation

@yzm1

@yzm1 yzm1 commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a repository-enforced release/vX.Y.Z initiation gate
  • require the release branch to point at current main and match pyproject.toml
  • create or validate the immutable version tag
  • explicitly dispatch publication with the exact tag and 40-character commit SHA
  • make the publish workflow revalidate tag/SHA/version identity before rebuilding and publishing

Why

Tags created by the repository GITHUB_TOKEN do not trigger ordinary push workflows. GitHub explicitly permits workflow_dispatch as the recursion-safe exception, so the gate dispatches publish.yml directly with pinned inputs.

Verification

  • YAML parsing and whitespace checks pass
  • branch/version validation tested with release/v0.10.0
  • bounded release audit: PASS for permissions, recursion behavior, checkout target, tag/SHA validation, PyPI sequencing, stable-tag update, and GitHub Release creation
  • prior release PR and post-merge main runs are fully green on Python 3.9–3.14 for Linux/Windows, build/install smoke, and hostile-input Action contract

Require a version-matched release branch at current main, create an immutable tag, and explicitly dispatch publication with a pinned tag and SHA.
@yzm1
yzm1 marked this pull request as ready for review August 12, 2026 12:14
@yzm1
yzm1 merged commit 5664437 into main Aug 12, 2026
14 checks passed
@yzm1
yzm1 deleted the codex/release-tag-gate branch August 12, 2026 12:14

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c3775effd8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +64 to +65
if not remote_tag or remote_tag[0] != release_sha:
raise SystemExit(f"tag {actual!r} does not resolve to {release_sha}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Recheck the main-commit invariant before publishing

When a repository writer directly invokes workflow_dispatch or pushes a matching version tag, this check accepts any tag/SHA whose checked-out package version matches, even if that commit would fail the new release branch's current-main check. gh workflow run --help confirms that --ref main only selects the ref containing the workflow file; it does not constrain release_sha to main. Consequently, publication can still bypass the claimed release gate, so this workflow should independently compare the supplied SHA with current main or otherwise verify that the gated workflow authorized it.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant